//
//  Blog.swift
//  mmda
//
//  Created by 李陆涛 on 2018/4/17.
//  Copyright © 2018年 mmda. All rights reserved.
//

import UIKit

class Video: Codable {
    
    var height,width:Int?
    
    var video_url,video_cover:String?
}

class Praise: Codable {
    
    var _id,blog_id,blog_user_id,praise_user_id,status:Int?
    var longitude,latitude:Double?
    var create_at,update_at:Date?
    
    var praise_user_info:User?
}

class Comment: Codable {
    
    var remark:String?
    var _id,blog_id,blog_user_id,comment_user_id,to_user_id,to_comment_id,status:Int?
    var longitude,latitude:Double?
    var create_at,update_at:Date?
    
    var comment_user_info,to_user_info:User?
}

class Blog: NSObject, Codable {

    var _id, user_id, status: Int?
    
    var longitude,latitude: Double?
    
    var remark: String?
    
    var create_at,update_at :Date?

    var pictures_new:[String]?
    
    var videos:[Video]?
    
    
    var is_praise: Bool?
    
    var user_info:User?

    var praise:[Praise]?
    var praise_count: Int?
    
    var comment:[Comment]?
    var comment_count: Int?
    
    var cacheHeight: CGFloat?
    
}


